<?php
		mysql_data_seek($forms_info, 0);
		/*echo "<pre>";
			print_r($forms_info);
		echo "</pre>";*/
		//$pup_only = $forms_info ;
		/*while($crap = sqlFetchArray($pup_only)){
			echo "<pre>";
			print_r($crap);
		echo "</pre>";
		}*/
	
		$anterior1 = '';
		$anterior2 = '';
		$anterior3 = '';
		
		function create_anterior($value){
			global $anterior1, $anterior2, $anterior3, $forms_info;
			
			$anterior1 = "<td><input type='text' id='1_antchamber_1' name='1_antchamber_1'>mm</input></td>";
			$anterior2 = "<td><input type='text' id='1_antchamber_2' name='1_antchamber_2'>mmHg</input></td>";
			$anterior3 = "<td><input type='text' id='1_antchamber_3' name='1_antchamber_3'>cells-mm<sup>2</sup></input></td>";
			
			$number = 2;
				while($row = sqlFetchArray($forms_info)){
					$anterior1 .= "<td><input type='text' id='".$number."_antchamber_1' name='".$number."_antchamber_1' value ='".$row['anterior_chamber_depth']."' >mm</input></td>";
					$anterior2 .= "<td><input type='text' id='".$number."_antchamber_2' name='".$number."_antchamber_2' value ='".$row['intraocular_pressure']."' >mmHg</input></td>";
					$anterior3 .= "<td><input type='text' id='".$number."_antchamber_3' name='".$number."_antchamber_3' value ='".$row['specular_microscopy']."'>cells-mm<sup>2</sup></input></td>";
					$number += 1;
				}
		}
		
		create_anterior(0);
?>
		
        <table class="vertical_table" id='t_anterior_chamber_depth'>
            <caption><?php echo xl('Anterior Chamber Depth (Treatment eye only)');?></caption>
            <thead>
                <tr>
                    <th colspan="3">1. <?php echo xl('Anterior Chamber Depth'); ?>:</th>
                </tr>
				<tr>
                    <th colspan="3">2. <?php echo xl('Intraocular Pressure'); ?>:</th>
                </tr>
				<tr>
                    <th colspan="3">3. <?php echo xl('Specular Microscopy'); ?>:</th>
                </tr>
            </thead>
            <tbody>
				<tr>
					<?php echo $anterior1;?>
				</tr>
				<tr>
					<?php echo $anterior2;?>	
				</tr>
				<tr>
					<?php echo $anterior3;?>
				</tr>				
            </tbody>
        </table>